test: unflake debugger and REPL tests - #64718
Conversation
There was a problem hiding this comment.
LGTM, but note that the flake won't be entirely resolved until https://chromium-review.googlesource.com/c/v8/v8/+/8123081 lands1
Footnotes
-
Running async, as you've done, makes this far more unlikely, but there's still a chance of it catching itself, if GC occurs at a poor time ↩
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #64718 +/- ##
==========================================
- Coverage 90.15% 90.14% -0.01%
==========================================
Files 741 744 +3
Lines 242251 242517 +266
Branches 45624 45686 +62
==========================================
+ Hits 218391 218608 +217
- Misses 15351 15407 +56
+ Partials 8509 8502 -7 🚀 New features to boost your workflow:
|
|
Run the debugger function-formatting checks against an auto-resumed, long-lived target so they do not depend on initial-break rendering. Use a synchronous VM evaluator for the REPL handleError test. Submit the throwing input separately and wait for clean REPL teardown. Signed-off-by: Matteo Collina <hello@matteocollina.com>
58ed4da to
dd871fa
Compare
Use a long-lived debugger target and assert that the prompt is received before sending the exit command. Handle child exit and timeout failures explicitly instead of leaving the test hanging when startup does not produce a prompt. Signed-off-by: Matteo Collina <hello@matteocollina.com>
Example: https://github.com/nodejs/node/actions/runs/30196530330/job/89779074224?pr=64718#step:8:4444 But my V8 fix is about to land, and I'll backport it to this repo |
Refs: https://github.com/nodejs/node/actions/runs/30080039199/job/89439279468?pr=64339
The macOS job exposed three independent test races:
test-debugger-extract-function-nameonly checks formatting from theexeccommand, but synchronized on an unrelated initial-break message. Run it
against an auto-resumed, long-lived target and synchronize directly on the
debugger prompt instead.
test-repl-user-error-handlercould receive an inspectorPromise was collectedevaluation error before the user error it intended toassert. Give this focused
handleErrortest a synchronous VM evaluator,submit the throwing and follow-up expressions separately, and await clean
REPL teardown.
test-debug-promptrelied on a nonexistent target and had no assertion,timeout, or child-process lifecycle handling. Use a long-lived debugger
target, assert that the prompt is received, and report startup/exit failures
instead of hanging.
Validation:
python3 tools/test.py test/sequential/test-debug-prompt.jspython3 tools/test.py parallel/test-debugger-extract-function-name parallel/test-repl-user-error-handler